#include <iostream>
#include <stack>
#include <stdio.h>
using namespace std;
int main()
{
	int n;
	while(scanf("%d",&n)!=EOF){
		if(n==0){
			cout<<0<<endl;
			continue;	
		}
		string result;
		while(n!=0){
			int k=n%2;
			if(k==0) result+='0';
			else result+='1';
			n/=2;
		}
		for(int j=result.length()-1;j>=0;j--) cout<<result[j];
		cout<<endl;
	}
}
